
@import '~less_base/theme';

.switch {
    position: relative;
    width: 52px;
    height: 32px;
    border-radius: 32000px;
    outline: none;
    display: inline-block;
    margin: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
    background-color: #DFDFDF;
    border: solid 1px #DFDFDF;
    cursor: pointer;

    .bgd {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: inherit;
        background-color: #FFF;
        transition: transform 0.3s;
    }

    .circle {
        position: absolute;
        top: 0;
        left: 0;
        width: percentage(3/5);
        height: 100%;
        border-radius: inherit;
        background-color: #FFF;
        transition: transform 0.3s;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    }


    &.checked {
        background-color: #53D769;
        border: solid 1px #53D769;
        .bgd {
            transform: scale(0);
        }

        .circle {
            transform: translateX(percentage(2/3));
        }
    }

    &.disabled {
        opacity: .7;
        cursor: not-allowed;
    }
}

.wpt {
    &.checked {
        background-color: @darkRed;
        border: solid 1px @darkRed;
    }
}

.wpt_mid_red {
    &.checked {
        background-color: #FD595A;
        border: solid 1px #FD595A;
    }
}
